Make teletype format capabilities match reality.
authorrobertlipe@gmail.com <robertlipe@gmail.com@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 9 Dec 2012 19:19:01 +0000 (19:19 +0000)
committerrobertlipe@gmail.com <robertlipe@gmail.com@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 9 Dec 2012 19:19:01 +0000 (19:19 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4219 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/teletype.c

index c91d3bbf13b271945aeaa628c3b00b06b727dbae..12d19001da9134bbcee2f33a24c349af0e8beca2 100644 (file)
@@ -35,10 +35,10 @@ arglist_t teletype_args[] = {
 *******************************************************************************/
 
 static gbuint32 tty_wpt_count;
-static gbfile *fin;
+static gbfilefin;
 
 static void
-teletype_rd_init(const char *fname)
+teletype_rd_init(const charfname)
 {
   char header[64];
 
@@ -59,7 +59,7 @@ teletype_read(void)
 {
   int i;
   for (i = 0; i < tty_wpt_count; i++) {
-    waypoint *wpt = waypt_new();
+    waypointwpt = waypt_new();
     wpt->shortname = (gbfgetcstr(fin));
     wpt->description = (gbfgetcstr(fin));
 
@@ -73,7 +73,7 @@ teletype_read(void)
     if (1) {  // need bit value of NEWFORMAT
       int len = gbfgetuint16(fin);
       // probably could treat as a pascal string
-      char *junk = (char*) xmalloc(len);
+      charjunk = (char*) xmalloc(len);
       gbfread(junk, len, 1, fin);
       xfree(junk);
     }
@@ -90,27 +90,6 @@ teletype_read(void)
   }
 }
 
-static void
-teletype_wr_init(const char *fname)
-{
-//     fout = gbfopen(fname, "w", MYNAME);
-}
-
-static void
-teletype_wr_deinit(void)
-{
-//     gbfclose(fout);
-}
-
-static void
-teletype_write(void)
-{
-// Here is how you register callbacks for all waypoints, routes, tracks.
-// waypt_disp_all(waypt)
-// route_disp_all(head, tail, rtept);
-// track_disp_all(head, tail, trkpt);
-}
-
 static void
 teletype_exit(void)            /* optional */
 {
@@ -124,16 +103,16 @@ teletype_exit(void)               /* optional */
 ff_vecs_t teletype_vecs = {
   ff_type_file,
   {
-    (ff_cap)(ff_cap_read | ff_cap_write)       /* waypoints */,
+    (ff_cap)(ff_cap_read)      /* waypoints */,
     ff_cap_none                        /* tracks */,
     ff_cap_none                        /* routes */
   },
   teletype_rd_init,
-  teletype_wr_init,
+  NULL,
   teletype_rd_deinit,
-  teletype_wr_deinit,
+  NULL,
   teletype_read,
-  teletype_write,
+  NULL,
   teletype_exit,
   teletype_args,
   CET_CHARSET_ASCII, 0                 /* ascii is the expected character set */